<template>
  <div class="home">
    <img alt="Vue logo" src="../assets/logo.png" />
    <div @click="toAbout">去about</div>
    <HelloWorld msg="这是第二个工程" />
  </div>
</template>

<script>
// @ is an alias to /src
import HelloWorld from "@/components/HelloWorld.vue";

export default {
  name: "Home",
  components: {
    HelloWorld
  },
  methods:{
    toAbout(){
      // localStorage.setItem('key','123')
      // const value = localStorage.getItem('key')
      // console.log('得到的值=', value)
      this.$router.push('/about')
    }
  }
};
</script>
